<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        ul,
        li {
            list-style: none;
        }

        a {
            text-decoration: none;
        }
        section{
            margin: 100px;
            border: 1px solid black;
            width: 300px;
            height: 300px;
        }
        ul li{
            font-size: 14px;
            margin-top: 5px;
            color: blue;
        }
        div .s1{
            font-weight: 10px;
        }
        div span{
            display: block;
        }

        div .s1{
            float: left;
        }
        div .s2{
            float: right;
            font-size: 14px;
            margin: 5px;
        }
        div{
            float: left;
            width: 300px;
        }
        ul{
            float: left;
        }
    </style>
</head>

<body>
    <!-- 布局暂未调整 -->
    <section>
        <div>
            <span class="s1">百度热搜 &nbsp; &nbsp;></span>
            <span class="s2">换一批</span>
        </div>
        <ul>
            <li></li>
        </ul>
    </section>
</body>

</html>
<script>
    var arr=[['啊哈啊我发改革我爱安徽发我爱哦'],['啊哈啊我发改革我爱安徽发我爱哦'],['啊哈啊我发改革我爱安徽发我爱哦'],['啊哈啊我发改革'],['啊哈啊我发改革我爱安徽发我爱哦'],['啊爱安徽发我爱哦']]
    var arr1=[['啊'],['啊哈啊我发改革我爱安徽发我爱哦'],['啊哈爱安徽发我爱哦'],['啊哈啊我发改革'],['啊哈啊我发改革我爱安徽发我爱哦'],['啊爱安徽发我爱哦']]
    //渲染到li里面
    function render(){
        document.querySelector('ul>li').innerHTML=arr.map((item)=>{
            return `<li>${item}</li>`
        }).join('')
    }
    //点击换一批
    document.querySelector('.s2').onclick=()=>{
        document.querySelector('ul>li').innerHTML=arr1.map((item)=>{
            return `<li>${item}</li>`
        }).join('')
    }
    render()
</script>